export default {
    name: 'Previewlistabn',
    components: {

    },
    data() {
        return {
            currentPage: 1,
            pagesize: 5,
            total: 0,
            height: '600',
            multipleSelection: [],
            searchForm: {
                deviceId: '',
                deviceName: '',
                deviceType: ''
            },
            TypeData: [],
            previewlistabnData: [
                {
                    deviceId: 'ALX2019061001',
                    deviceName: 'ALBox-61001',
                    type: 'AiKits@Aibox',
                    exceptionNumber: '100',
                    runTime: '10',
                    remarks: ''
                },
                {
                    deviceId: 'ALX2019061001',
                    deviceName: 'ALBox-61001',
                    type: 'AiKits@Aibox',
                    exceptionNumber: '100',
                    runTime: '10',
                    remarks: ''
                },
                {
                    deviceId: 'ALX2019061001',
                    deviceName: 'ALBox-61001',
                    type: 'AiKits@Aibox',
                    exceptionNumber: '100',
                    runTime: '10',
                    remarks: ''
                },
                {
                    deviceId: 'ALX2019061001',
                    deviceName: 'ALBox-61001',
                    type: 'AiKits@Aibox',
                    exceptionNumber: '100',
                    runTime: '10',
                    remarks: ''
                },
                {
                    deviceId: 'ALX2019061001',
                    deviceName: 'ALBox-61001',
                    type: 'AiKits@Aibox',
                    exceptionNumber: '100',
                    runTime: '10',
                    remarks: ''
                },
                {
                    deviceId: 'ALX2019061001',
                    deviceName: 'ALBox-61001',
                    type: 'AiKits@Aibox',
                    exceptionNumber: '100',
                    runTime: '10',
                    remarks: ''
                },
                {
                    deviceId: 'ALX2019061001',
                    deviceName: 'ALBox-61001',
                    type: 'AiKits@Aibox',
                    exceptionNumber: '100',
                    runTime: '10',
                    remarks: ''
                }
            ]
        }
    },
    computed: {
        offset:function(){
            return (this.currentPage -1)*this.pagesize;
        }
    },
    watch: {

    },
    created() {

    },
    mounted() {

    },
    methods: {
        toggleSelection(rows) {
            if (rows) {
                rows.forEach(row => {
                    this.$refs.multipleSelection.toggleRowSelection(row);
                });
            } else {
                this.$refs.multipleTable.clearSelection();
            }
        },
        handleSelectionChange() {
            this.multipleSelection = [];
        },
        handleSizeChange(val) {
            this.pagesize = val;
        },
        handleCurrentChange(val) {
            this.currentPage = val;
        }
    },
}